# coding=utf-8
import time
from selenium import webdriver

'''
browser = webdriver.Firefox()
browser.get('http://www.baidu.com/')
'''
driver = webdriver.Firefox()
driver.get("http://www.zgjiaoyan.com/")
try:
    links = driver.find_elements_by_tag_name("a")
    print("=============links",links)
    for link in links:
        if ("zgjiaoyan" in link.get_attribute("href")):
            print("=========link",link.get_attribute("href"))
            #link.click()
            #driver.back()
except Exception as e:
    print(format(e))

#driver.quit()